home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / include / sun3.md / sys / core.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-16  |  1.9 KB  |  62 lines

  1. /*    @(#)core.h 1.18 88/08/19 SMI    */
  2.  
  3. /*
  4.  * Copyright (c) 1987 by Sun Microsystems, Inc.
  5.  */
  6.  
  7. #ifndef _SYS_CORE_H
  8. #define _SYS_CORE_H
  9.  
  10. #include <sys/exec.h>
  11. #include <sun3.md/reg.h>
  12.  
  13. #define CORE_MAGIC    0x080456
  14. #define CORE_NAMELEN    16        /* Related to MAXCOMLEN in user.h */
  15.  
  16. #if defined(sun2) || defined(sun3) || defined(sun3x)
  17. /*
  18.  * The size of struct fpa_regs is changed from 141 ints in 3.0 to
  19.  * 77 ints in 3.x.  A pad of this size difference is added to struct core.
  20.  */
  21. #define CORE_PADLEN    64
  22. #endif
  23.  
  24. /*
  25.  * Format of the beginning of a `new' core file.
  26.  * The `old' core file consisted of dumping the u area.
  27.  * In the `new' core format, this structure is followed
  28.  * copies of the data and  stack segments.  Finally the user
  29.  * struct is dumped at the end of the core file for programs
  30.  * which really need to know this kind of stuff.  The length
  31.  * of this struct in the core file can be found in the
  32.  * c_len field.  When struct core is changed, c_fpstatus
  33.  * and c_fparegs should start at long word boundaries (to
  34.  * make the floating pointing signal handler run more efficiently).
  35.  */
  36. struct core {
  37.     int    c_magic;        /* Corefile magic number */
  38.     int    c_len;            /* Sizeof (struct core) */
  39.     struct    regs c_regs;        /* General purpose registers */
  40.     struct     exec c_aouthdr;        /* A.out header */
  41.     int    c_signo;        /* Killing signal, if any */
  42.     int    c_tsize;        /* Text size (bytes) */
  43.     int    c_dsize;        /* Data size (bytes) */
  44.     int    c_ssize;        /* Stack size (bytes) */
  45.     char    c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  46. #ifdef sun3
  47.     /* This is from the old core.h (C) 1985, but gdb still wants
  48.        this stuff, and I don't think any other sprite program
  49.        uses core.h */
  50.     struct     fp_status c_fpstatus;    /* External FPP state, if any */
  51.     struct  fpa_regs c_fparegs;    /* FPA registers, if any */
  52.     int    c_pad[CORE_PADLEN];    /* see comment above */
  53. #else    
  54. #ifdef FPU
  55.     struct    fpu c_fpu;        /* external FPU state */
  56. #endif
  57.     int    c_ucode;        /* Exception no. from u_code */
  58. #endif    
  59. };
  60.  
  61. #endif /*!_SYS_CORE_H*/
  62.